// This file is required by the index.html file and will
// be executed in the renderer process for that window.
// All of the Node.js APIs are available in this process.


const fs = require('fs')
const $ = require("jquery");

//监听ping事件
const  ipcRenderer = require('electron').ipcRenderer
ipcRenderer.on('fileWatcher', function(event, message) {
  const content = fs.readFileSync(message.split('==')[1], 'utf-8');
  console.log('content===>', content);
});
ipcRenderer.on('keyWatcher', function(event, message) {
  const logger = $("#J_logger")
  console.log('content===>', message);
  logger.append("<p>"+message+"</p>");
});